package com.sctvcloud.qingchuan.beans;

/**
 * @author suming
 * @date 2020/8/14 11:06
 */
public class EventMessage {
    private int key;
    private Object value;

    private EventMessage(Builder builder) {
        key = builder.key;
        value = builder.value;
    }

    public int getKey() {
        return key;
    }

    public Object getValue() {
        return value;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public static final class Builder {
        private int key;
        private Object value;

        public Builder() {
        }

        public Builder key(int val) {
            key = val;
            return this;
        }

        public Builder value(Object val) {
            value = val;
            return this;
        }

        public EventMessage build() {
            return new EventMessage(this);
        }
    }
}
